package com.neusoft.po;

import java.math.BigDecimal;

import org.springframework.beans.factory.annotation.Autowired;

public class Wallet {
    private String userId;
    private BigDecimal money = BigDecimal.ZERO;

    public BigDecimal pay(BigDecimal amount){
        this.money = money.subtract(amount);
        return this.money;
    }
    public String getUserId() {
        return userId;
    }

    public void setUserId(String userId) {
        this.userId = userId;
    }

    public BigDecimal getMoney() {
        return money;
    }

    public void setMoney(BigDecimal money) {
        this.money = money;
    }

}
